import Vue from 'vue'
import App from './App'
/*路由*/
import router from './router'
/*数据请求*/
import VueResource from 'vue-resource'
Vue.use(VueResource)
/*导入时间格式化工具*/
import moment from "moment"
/*定义全局过滤器*/
Vue.filter('dateFormat',function (dateStr,pattern = "YYYY-MM-DD HH:mm:ss") {
  return moment(dateStr).format(pattern);
})
Vue.filter('subStr0_',function (dateStr,pattern = 20) {
  return dateStr.substr(0,pattern) + "..."
})

/*饿了么组件*/
import 'mint-ui/lib/style.css'
// import {Button, Cell, Header, Popup, Swipe, SwipeItem, InfiniteScroll,CellSwipe,Lazyload,Tabbar, TabItem} from 'mint-ui'
import MintUI from 'mint-ui'
Vue.use(MintUI);
// Vue.component(Button.name, Button);
// Vue.component(Cell.name, Cell);
// Vue.component(Header.name, Header);
// Vue.component(Popup.name, Popup);
// Vue.component(Swipe.name, Swipe);
// Vue.component(SwipeItem.name, SwipeItem);
// Vue.use(InfiniteScroll);
// Vue.component(CellSwipe.name, CellSwipe);
// Vue.use(Lazyload);
// Vue.component(Tabbar.name, Tabbar);
// Vue.component(TabItem.name, TabItem);

/*MUI样式*/
import './lib/mui/css/mui.css'
import './lib/mui/fonts/mui-icons-extra.ttf'
import './lib/mui/fonts/mui.ttf'


Vue.config.productionTip = false;

new Vue({
  el: '#app',
  router,
  render: c => c(App),
});
